package com.game.action;

import com.coment.po.UserTaskInfo;
import com.game.dao.user.task.UserTaskInfoDao;
import com.xs.action.annotate.ActionController;
import com.xs.action.annotate.ActionMethod;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/// 10-任务
@Slf4j
@ActionController(10)
@RestController
@RequestMapping("/userTask")
public class UserTaskAction {
    @Resource
    private UserTaskInfoDao userTaskInfoDao;

    /// 1-获取任务列表
    @ActionMethod(1)
    @GetMapping("/obtainByUserInfoId")
    public List<UserTaskInfo> obtainByUserInfoId(Integer userInfoId) {
        return userTaskInfoDao.findByUserInfoId(userInfoId);
    }
}
